import java.util.Scanner;

public class Homework3 {
    public static int func(int n){
        int i, temp0, temp1, temp2;
        if(n<=1) return n;
        temp0 = 0;
        temp1 = 0;
        temp2 = 1;
        for(i = 1; i < n; i++){
            temp0 = temp1 + temp2;
            temp1 = temp2;
            temp2 = temp0;
        }
        return temp0;
    }
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        int b = func(a);
        System.out.println(b);
    }
}
